import request from '@/utils/request';

/**
 * 获取奖惩记录列表
 */
export const getRewardPunishmentList_API = async (params: any) => await request.get('/api/getRewardPunishmentList');

/**
 * 获取奖惩记录详情
 */
export const getRewardPunishmentDetail_API = async (params: any) => await request.get(`/api/getRewardPunishmentDetail/${params.rewardPunishmentId}`);

/**
 * 添加奖惩记录（仅管理员）
 */
export const addRewardPunishment_API = async (params: any) => await request.post('/api/addRewardPunishment', params);

/**
 * 删除奖惩记录（仅管理员）
 */
export const deleteRewardPunishment_API = async (params: any) => await request.delete(`/api/deleteRewardPunishment/${params.rewardPunishmentId}`);

/**
 * 修改奖惩记录（仅管理员）
 */
export const updateRewardPunishment_API = async (params: any) => await request.put(`/api/updateRewardPunishment/${params.rewardPunishmentId}`, params);


export default {
  getRewardPunishmentList_API,
  getRewardPunishmentDetail_API,
  addRewardPunishment_API,
  deleteRewardPunishment_API,
  updateRewardPunishment_API
}